package com.nulgame.bukkit.plugin.responsebuilder;

import com.nulgame.bukkit.plugin.resource.Resource;

public class AntiIPAddressResponseBuilder extends GenericResponseBuilder {
	private String m_ip;
	public AntiIPAddressResponseBuilder(String responseFormat, String playerName, String message, String ip) {
		super(responseFormat, playerName, message);
		m_ip = ip;
	}
	
	@Override
	public String toResponse() {
		String response = super.toResponse();
		if(response == null){
			return null;
		}
		
		response = response.replaceAll(Resource.IP_VARIABLE, m_ip);
		
		return response;
	}
}
